<template>
  <el-dialog title="新增" :visible.sync="dialogVisible" width="30%" class="popup" :before-close="handleClose">
    <!-- form表单 -->
    <el-form ref="search" :model="formInline" class="search" label-width="110px">
      <el-form-item label="车牌号:">
        <el-input v-model="formInline.user" placeholder="请输入名称" />
      </el-form-item>
      <el-form-item label="所属人员:">
        <el-input v-model="formInline.region" type="password" placeholder="请输入编号" />
      </el-form-item>
      <el-form-item label="车牌颜色:">
        <el-input v-model="formInline.user" placeholder="请输入名称" />
      </el-form-item>
      <el-form-item label="车辆颜色:">
        <el-input v-model="formInline.user" placeholder="请输入名称" />
      </el-form-item>
      <el-form-item label="号牌类型:">
        <el-input v-model="formInline.user" placeholder="请输入名称" />
      </el-form-item>
      <el-form-item label="车辆品牌:">
        <el-input v-model="formInline.user" placeholder="请输入名称" />
      </el-form-item>
      <el-form-item label="车辆类型:">
        <el-input v-model="formInline.user" placeholder="请输入名称" />
      </el-form-item>
      <el-form-item label="车辆有效期:">
        <el-date-picker v-model="value1" type="date" placeholder="选择日期">
        </el-date-picker>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button size="small" @click="dialogVisible = false">取消</el-button>
      <el-button type="primary" size="small" @click="dialogVisible = false">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
  components: {
  },
  data () {
    return {
      dialogVisible: false,
      ruleForm: {
        pass: '',
        checkPass: '',
        age: ''
      },
      formInline: {
        user: '',
        region: '',
        deptId: []
      },
      value: null,
      value1: '',
      // define options
      options: [{
        id: 'a',
        label: 'a',
        children: [{
          id: 'aa',
          label: 'aa',
        }, {
          id: 'ab',
          label: 'ab',
        }],
      }, {
        id: 'b',
        label: 'b',
      }, {
        id: 'c',
        label: 'c',
      }],
    }
  },
  computed: {
    rules () {
      return {
        pass: [
          { required: true, message: '请输入活动名称', trigger: 'blur' },
        ],
        checkPass: [
          { required: true, message: '请输入活动名称', trigger: 'blur' },
        ],
        age: [
          { required: true, message: '请输入活动名称', trigger: 'blur' },
        ]
      }
    }

  },
  methods: {
    toggleAdd (flag) {
      this.dialogVisible = flag
    },
    handleClose (done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => { })
    }
  }
};
</script>

<style lang="scss" scoped>
.el-descriptions {
  border-bottom: 1px solid #cdd0db;
}

.popup {
  ::v-deep .el-dialog {
    border-radius: 4px;
  }
  ::v-deep .el-dialog__header {
    border-bottom: 1px solid #cdd0db;
  }
  ::v-deep .el-dialog__body {
    padding: 30px;
  }
}
</style>

